﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GreateTool
{
    public partial class FileSelectForm : Form
    {
        public FileSelectForm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            openFileDialog1.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                richTextBox1.Lines = openFileDialog1.FileNames;
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            folderBrowserDialog1.RootFolder = Environment.SpecialFolder.Desktop;

            if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
            {
                richTextBox1.Lines = System.IO.Directory.GetFiles(folderBrowserDialog1.SelectedPath, "*.pdf", System.IO.SearchOption.AllDirectories);
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Clipboard.SetText(richTextBox1.Text);
        }
    }
}
